<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript"
        src="<c:url value="pages/jquery-2.1.0.min.js"/> "></script>
<script type="text/javascript">
jQueryforu={
		getDNames: function(){
			var id=$(this).text();
			return $.ajax({
					url:'${pageContext.request.contextPath}/ecntr/gdpts.htm',
					type: 'GET',
					dataType: 'JSON',
					data: id
				});
				
			}
		}
	
	jQueryforu={
		getRender: function(res){
			$('#email').val(res.email);
			$('#eno').val(res.id);
		}
	}
	$(document).ready(function(){
		jQueryforu.getDnames(res,jQueryforu.getRender(res));						
		
	});
</script>
<title>Insert title here</title>
</head>
<body>
	<form class="form-horizontal">
		<fieldset>
		
		<!-- Form Name -->
		<legend>Create Employee</legend>
			
			<!-- Text input-->
				<div class="control-group">
				  <label class="control-label" for="textinput">Emp No</label>
				  <div class="controls">
				    <input id="eno" name="textinput" placeholder="your id " class="input-medium" required="" type="text">
				    
				  </div>
				</div>

			<!-- Text input-->
				<div class="control-group">
				  <label class="control-label" for="textinput">Emp Name</label>
				  <div class="controls">
				    <input id="ename" name="textinput" placeholder="Name.." class="input-medium" required="" type="text" >
				    <!--  <script type="text/javascript">
				    	$('#ename').change(function(){
				    		alert("hello");
				    		$(document).ready();
				    	});--> 		
				    	
				    </script>
				  </div>
				</div>
		</fieldset>
		</form>
</body>
</html>